/**
 * 
 */
package interval;

/**
 * @author Michael
 *
 */
public class Interval<T extends Comparable<? super T>> {
	public T begin;
	public T end;
	public boolean beginInclusive;
	public boolean endInclusive;
	
	
	/**
	 * 
	 */
	public Interval(T begin, T end) {
		this.begin = begin;
		this.end = end;
		this.beginInclusive = true;
		this.endInclusive = true;
	}
	
	@Override
	public String toString() {
		return (beginInclusive ? "[" : "(") + String.valueOf(begin) + ", " +
	            String.valueOf(end) + (endInclusive ? "]" : ")" );
	}
}
